//
//  TourCollectionCell.m
//  EasyToTesco2.0
//
//  Created by 杨森 on 2017/5/17.
//  Copyright © 2017年 EasyToTesco. All rights reserved.
//

#import "TourCollectionCell.h"

@implementation TourCollectionCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.contentView.backgroundColor = [UIColor whiteColor];
        [self buildSubViews];
    }
    return self;
}

- (void)buildSubViews
{
    [self.contentView addSubview:self.contentImg];
    [self.contentView addSubview:self.contentLabel];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    
    self.contentImg.frame = CGRectMake(0,0,self.width, self.Height);
    WeakSelf(self);
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(weakself);
    }];
    
}



- (UIImageView *)contentImg
{
    if (!_contentImg) {
        _contentImg = [[UIImageView alloc] init];
    }
    return _contentImg;
}

- (UILabel *)contentLabel
{
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.textColor = [UIColor whiteColor];
        _contentLabel.font = FONT(12);
        _contentLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _contentLabel;
}

@end
